let fn = async (x, { socket, io, reg, user, NOTIFY }, topic) => {
    try {
        let r = await reg.rooms.list()
        socket.emit(topic, r)
    } catch ({ message }) {
        socket.emit(NOTIFY, { topic, data: message })
    }
}

module.exports = fn